﻿<UserControl x:Class="Connect.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel>
            <TextBlock>Server-Address</TextBlock>
            <TextBox HorizontalAlignment="Stretch" Name="AddressBox" Text="{Binding ServerAddress, Mode=TwoWay}" VerticalAlignment="Top" IsEnabled="{Binding IsDisconnected}" />
            <TextBlock>Query-Port</TextBlock>
            <TextBox HorizontalAlignment="Stretch" Name="PortBox" Text="{Binding ServerPort, Mode=TwoWay}" VerticalAlignment="Top" IsEnabled="{Binding IsDisconnected}" />
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Content="Connect" Name="ConnectButton" Click="ConnectButton_Click" IsEnabled="{Binding CanConnect}" />
                <Button Content="Disconnect" Name="DisconnectButton" Click="DisconnectButton_Click" IsEnabled="{Binding CanDisconnect}"/>
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
